include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

set(EXE_NAME mvDirectionRegApp)

file(GLOB_RECURSE testHeaderFiles "${CMAKE_SOURCE_DIR}/include/*.h")
set(INCLUDE_FILES_LIST
    ${testHeaderFiles}
)

file(GLOB_RECURSE myFiles ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

set(CMAKE_C_FLAGS "-O0 -rdynamic -g -funwind-tables -ffunction-sections")

# set(OUTER_INCLUDE_FILES_LIST
#     ${CMAKE_CURRENT_SOURCE_DIR}/include/heartbeat_interface.h
#     ${CMAKE_CURRENT_SOURCE_DIR}/include/heartbeat_server.h
#     ${CMAKE_CURRENT_SOURCE_DIR}/include/heartbeat_ipc_name.h)

set(OUTER_CONFIG_FILES_LIST
    ${CMAKE_SOURCE_DIR}/conf/passport_reg.json)

# ADD_LIBRARY(${LIB_NAME} SHARED ${INCLUDE_FILES_LIST} ${libFiles})
# SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${LIB_VERSION} SOVERSION ${LIB_SOVERSION})

ADD_EXECUTABLE(${EXE_NAME} ${INCLUDE_FILES_LIST} 
${myFiles}
/home/userdata/lizh/rv1126_facial_gate_release/external/rkmedia/examples/common/sample_common_isp.c)

target_link_libraries(${EXE_NAME}
${JSON_CPP_LIBS}
${MV_PASS_LIBS}
${RKMEIDA_LIBS}
${OPENCV_LIBS}
${CURL_LIBS}
${HV_LIBS}
pthread)

INSTALL(TARGETS ${EXE_NAME}
        RUNTIME DESTINATION bin
)

# install (FILES ${OUTER_INCLUDE_FILES_LIST}
#         DESTINATION include)

install (FILES ${OUTER_CONFIG_FILES_LIST}
        DESTINATION config)